package com.assessment.dao;


import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import com.assessment.entity.AssessmentIndex;

@Repository
public interface AssessmentIndexRepository extends PagingAndSortingRepository<AssessmentIndex,Long>,JpaSpecificationExecutor<AssessmentIndex>{
	
	@Query("from AssessmentIndex a  where a.assessmentTemplate.id=?1")
	public Page<AssessmentIndex> findAll(Long id,Pageable pageable);
	

}
